"""artile文章视图"""
from django.shortcuts import render
def to_article_list(request):
    """文章列表"""
    #模文章列表数据，采用key:vlue表示，字段属性：title,author,price,content,pub_date,status
    articles = [
        {'title':'Python','author':'张三','price':100,'content':'Python是一种高级编程语言','pub_date':'2023-05-01','status':0},
        {'title':'Java','author':'李四','price':200,'content':'Java是一种面向对象的编程语言','pub_date':'2023-05-02','status':1},
        {'title':'C++','author':'王五','price':300,'content':'C++是一种通用的编程语言','pub_date':'2023-05-03','status':0},
        {'title':'PHP','author':'赵六','price':400,'content':'PHP是一种服务器端脚本语言','pub_date':'2023-05-04','status':1},
        {'title':'JavaScript','author':'钱七','price':500,'content':'JavaScript是一种客户端脚本语言','pub_date':'2023-05-05','status':0},
        {'title':'Ruby','author':'孙八','price':600,'content':'Ruby是一种动态脚本语言','pub_date':'2023-05-06','status':1}

    ]
    return render(request, 'blog/article.html',{'articles':articles})